<html>
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <style>
      *{
        display: inline-block;
        
      }
    </style>
</head>
<body>
    <div id="test" data-html="我是谁"></div>
</body>
<script>
  var test= document.getElementById("test");

test.setAttribute("data-html", "我是你");
</script>
</html>